Field of the Invention
The disclosure relates to a signal switching technique of an electronic device, and particularly relates to an electronic device applying a connecting module and a sound output unit to switch audio output, and a method for switching audio output.
Description of Related Art
Along with continuous development of technology, electronic products are developed towards a trend of lightness and thinness, so as to facilitate user's carry and usage. Therefore, the commonly used portable electronic devices, for example, smart phones, mobile phones, multimedia players, tablet personal computers (PCs) and notebook computers, etc., have become a mainstream in market of consumer electronics.
In order to ensure the user listening audio provided by the portable electronic device or conducting communication without bothering other people, a headset has become a necessary accessory of the portable electronic device. Generally, the portable electronic device is configured with a loudspeaker and a connecting port suitable for plugging a headset plug, and when the headset plug is not plugged into the corresponding connecting port, the audio provided by the portable electronic device is output by the loudspeaker. Conversely, when the headset plug is plugged into the corresponding connecting port, the audio provided by the portable electronic device is transmitted to the headset, and the audio is output by the headset. Namely, the portable electronic device generally implements a switching mechanism for audio providing modes thereof by plugging/unplugging the headset plug to/from the corresponding connecting port. However, repeatedly plugging/unplugging the headset plug to/from the corresponding connecting port is not only inconvenient in operation, but may also cause damage to the headset to decrease a usage life thereof.
Presently, in some of the portable electronic devices, in case that the headset plug is plugged into the corresponding connecting port, the audio can be selectively output by the loudspeaker or the headset under control of inbuilt software thereof, though it is time-consuming in operation and operation steps thereof are complicated, which is inconvenient for the user to use.